7. Using the Exchange Management Shell to Add Blocked Senders
Sender filtering can also be configured through
the Exchange Management Shell. Each shell command has its own parameters
you can set based on the action(s) performed by the command. There are
two commands: Get and Set.
The Get- command is used to retrieve the configuration of the Sender Filtering Agent. For example, entering Get-SenderFilterConfig displays the Sender Filtering configuration on the local system.
The Set- command allows an
administrator to enable or disable the agent and modify the
configuration of the agent. The following example enables the Sender
Filtering Agent and rejects messages from blank senders on external SMTP
connections.
Set-SenderFilterConfig -Enabled $true -Action Reject
-BlankSenderBlockingEnabled $true -ExternalMailEnabled $true -Enabled $true
8. Configuring Recipient Filtering
Recipient filtering allows an administrator to
block email delivery from the Internet to a specific email address.
Email that is routed through Receive Connectors is processed by the
Recipient Filtering Agent. In addition, recipient filtering can prevent
delivery of email messages to nonexistent accounts in Active Directory.
This is extremely effective in stopping spam and virus-laden email to
abused or commonly named email accounts (for example, [email protected] or [email protected]).
Note
A maximum of 800 email addresses can be placed in this list.
The Recipient Filtering Agent is enabled by
default and can be configured using the Exchange Management Console or
Exchange Management Shell.
Note
Changes described in this section are applied
only to the local system. This is important if you have more than one
Edge Transport server in your environment.
To disable the Recipient Filtering Agent using
the Exchange Management Console, right-click the agent icon in the
action pane and select Disable. To disable the Recipient Filtering Agent
using the Exchange Management Shell, run the set-RecipientFilterConfig command with the -Enabled $false parameter.
Example: set-RecipientFilterConfig -Enabled $false
The General tab of the Agent Properties window
displays a brief description of the agent and its capabilities, its
current status, and the last time the agent’s settings were modified.
To add email addresses to the Recipient
Filtering list, double-click the recipient Filtering Agent in the action
pane and select the Blocked Recipients tab, as shown in Figure 2.
From here, you can add, edit, or delete entries in the list. You can
also enable the Block Messages Sent to Recipients Not Listed in the
Recipient List field. Enabling this feature prevents delivery of email
messages to nonexistent accounts in Active Directory.
Note
For the Block Messages Sent to Recipients Not
Listed in the Recipient List feature to work, you must first configure
the EdgeSync process and Active Directory Application Mode (ADAM) for
recipient lookup.
Tip
Using the Block Messages Sent to Nonexistent
Senders can help drastically reduce the amount of email sent to commonly
targeted addresses like [email protected], [email protected], and [email protected].
This also reduces the spammer’s ability to identify which email
addresses are valid when no response or a response other than
“nonexistent user” is returned in a nondelivery report (NDR).
9. Using the Exchange Management Shell to Add Blocked Recipients
Recipient
filtering can also be configured through the Exchange Management Shell.
Each shell command has its own parameters you can set based on the
action(s) performed by the command. There are two commands: Get and Set.
The Get- command is used to retrieve the configuration of the Sender Filtering Agent. For example, entering Get-RecipientFilterConfig displays the Recipient Filtering configuration on the local system.
The Set- command allows an
administrator to enable or disable the agent or modify the configuration
of the agent. The following example enables the Recipient Filtering
Agent and rejects messages to nonexistent recipients on external SMTP
connections.
Set-RecipientFilterConfig -Enabled $true -ExternalMailEnabled $true -
RecipientValidationEnabled $true